﻿using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Data;
using System.Windows.Media;

namespace PokemonGo.UI.Common.Converter
{
    public class PokemonRunTypeConverterBackgroundColor : IValueConverter
    {
        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
        {
            bool isRunning = false;
            bool.TryParse(value.ToString(), out isRunning);
            if (isRunning)
            {
                return new SolidColorBrush(Colors.LimeGreen);
            }
            else
            {
                return new SolidColorBrush(Colors.DarkGray);
            }
        }

        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
        {
            return false;
        }
    }
}
